package com.blb.zy_community.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blb.zy_community.entity.ZyOwner;
import com.blb.zy_community.mapper.ZyOwnerMapper;
import com.blb.zy_community.service.IZyOwnerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 业主  服务实现类
 * </p>
 *
 * @author 二组
 * @since 2023-06-18
 */
@Service
public class ZyOwnerServiceImpl extends ServiceImpl<ZyOwnerMapper, ZyOwner> implements IZyOwnerService {
    @Autowired
    private ZyOwnerMapper zyOwnerMapper;

    @Override
    public Page<ZyOwner> getZyOwnerPage(Long current, Long size,String ownerNiceName,String ownerRealName,String ownerIdCard,String ownerPhoneNumber) {
        Page<ZyOwner> zyOwnerPage= zyOwnerMapper.selectZyOwnerPage(new Page<ZyOwner>(current,size),ownerNiceName,ownerRealName,ownerIdCard,ownerPhoneNumber);
        return zyOwnerPage;
    }

    @Override
    public List<ZyOwner> getZyOwnerName(String ownerRealName) {
        return zyOwnerMapper.selectZyOwnerName(ownerRealName);
    }
}
